<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>星链</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }

        :root {
            --primary: #4361ee;
            --secondary: #3a0ca3;
            --accent: #4cc9f0;
            --light: #f8f9fa;
            --dark: #1d3557;
            --gray: #6c757d;
            --light-gray: #e9ecef;
            --border: #dee2e6;
            --success: #4ade80;
            --warning: #f59e0b;
            --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            --transition: all 0.3s ease;
        }

        body {
            background-color: #f5f7fa;
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* 顶部导航栏 */
        .header {
            background: white;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 25px;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .custom-logo {
            height: 40px;
            width: auto;
            object-fit: contain;
        }

        .logo-text {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--dark);
        }

        .nav-links {
            display: flex;
            gap: 30px;
        }

        .nav-item {
            padding: 8px 0;
            position: relative;
            cursor: pointer;
            font-weight: 500;
            color: var(--gray);
        }

        .nav-item.active {
            color: var(--primary);
        }

        .nav-item.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--primary);
            border-radius: 3px;
        }

        .nav-item:hover {
            color: var(--primary);
        }

        .user-area {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .vip-badge {
            background: linear-gradient(135deg, #ffd700, #ff9800);
            color: #fff;
            padding: 5px 12px;
            border-radius: 30px;
            font-size: 0.85rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), var(--primary));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
        }

        /* 主内容区 */
        .main-content {
            display: flex;
            flex: 1;
        }

        /* 左侧菜单 */
        .sidebar {
            width: 240px;
            background: white;
            height: calc(100vh - 60px);
            position: sticky;
            top: 60px;
            padding: 25px 0;
            border-right: 1px solid var(--border);
            box-shadow: 3px 0 10px rgba(0, 0, 0, 0.02);
        }

        .menu-title {
            padding: 0 25px;
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 15px;
            color: var(--dark);
        }

        .menu-item {
            padding: 12px 25px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            transition: var(--transition);
            color: var(--gray);
        }

        .menu-item:hover {
            background: rgba(67, 97, 238, 0.05);
            color: var(--primary);
        }

        .menu-item.active {
            background: rgba(67, 97, 238, 0.1);
            color: var(--primary);
            border-left: 4px solid var(--primary);
        }

        /* 右侧内容区 */
        .content-area {
            flex: 1;
            padding: 30px;
        }

        .content-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .page-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--dark);
        }

        /* 档案建立表单样式 */
        .form-container {
            background: white;
            border-radius: 12px;
            padding: 30px;
            box-shadow: var(--card-shadow);
        }

        .form-title {
            font-size: 1.4rem;
            font-weight: 600;
            margin-bottom: 25px;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .form-title i {
            color: var(--primary);
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--dark);
        }

        .form-control {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 1rem;
            transition: var(--transition);
        }

        .form-control:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
        }

        .form-control::placeholder {
            color: var(--gray);
            opacity: 0.6;
        }

        .select-control {
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 10px center;
            background-size: 1em;
        }

        .form-actions {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
        }

        .btn {
            padding: 12px 25px;
            border-radius: 6px;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
        }

        .btn-primary {
            background: var(--primary);
            color: white;
            border: none;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--border);
            color: var(--gray);
        }

        .btn-primary:hover {
            background: var(--secondary);
            box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
        }

        .btn-outline:hover {
            border-color: var(--gray);
            color: var(--dark);
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .nav-links {
                display: none;
            }

            .sidebar {
                width: 60px;
                padding: 25px 0;
            }

            .menu-title, .menu-item span {
                display: none;
            }

            .menu-item {
                justify-content: center;
                padding: 12px 0;
            }

            .content-area {
                padding: 20px;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
<!-- 顶部导航栏 -->
<div class="header">
    <div class="logo-container">
        <img src="logo1.jpg" alt="企业Logo" class="custom-logo">
        <div class="logo-text">星链</div>
    </div>

    <div class="nav-links">
        <div class="nav-item" onclick="window.location.href='companies.html'">我的企业</div>
        <div class="nav-item" onclick="window.location.href='bs.html'">背调查询</div>
        <div class="nav-item active">人才档案管理</div>
        <div class="nav-item" onclick="window.location.href='vip.html'">会员开通</div>
    </div>

    <div class="user-area">

        <div class="user-avatar">管</div>
    </div>
</div>

<!-- 主内容区 -->
<div class="main-content">
    <!-- 左侧菜单 -->
    <div class="sidebar">
        <div class="menu-title">人才档案</div>
        <div class="menu-item" onclick="window.location.href='fs.html'">
            <i class="fas fa-database"></i>
            <span>档案查询</span>
        </div>
        <div class="menu-item active">
            <i class="fas fa-file-alt"></i>
            <span>档案建立</span>
        </div>
        <div class="menu-item" onclick="window.location.href='employee.html'">
            <i class="fas fa-users"></i>
            <span>在职人员档案管理</span>
        </div>
    </div>

    <!-- 右侧内容区 -->
    <div class="content-area">
        <div class="content-header">
            <h1 class="page-title">人才档案管理</h1>
        </div>

        <div class="form-container">
            <h2 class="form-title">
                <i class="fas fa-user-plus"></i>
                添加员工档案
            </h2>

            <div class="form-grid">
                <div class="form-group">
                    <label for="name">姓名</label>
                    <input type="text" id="name" class="form-control" placeholder="请输入姓名">
                </div>

                <div class="form-group">
                    <label for="id-number">身份证号</label>
                    <input type="text" id="id-number" class="form-control" placeholder="请输入证件号码">
                </div>

                <div class="form-group">
                    <label for="gender">性别</label>
                    <select id="gender" class="form-control select-control">
                        <option value="">请选择性别</option>
                        <option value="male">男</option>
                        <option value="female">女</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="position">职位</label>
                    <input type="text" id="position" class="form-control" placeholder="请输入职位">
                </div>

                <div class="form-group">
                    <label for="relation">关系</label>
                    <select id="relation" class="form-control select-control">
                        <option value="">请选择关系</option>
                        <option value="employee">正式员工</option>
                        <option value="intern">实习生</option>
                        <option value="contract">合同工</option>
                        <option value="temporary">临时工</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="contact">联系方式</label>
                    <input type="text" id="contact" class="form-control" placeholder="请输入手机号码或邮箱">
                </div>

                <div class="form-group">
                    <label for="create-date">建档日期</label>
                    <input type="date" id="create-date" class="form-control">
                </div>

                <div class="form-group">
                    <label for="remark">备注</label>
                    <textarea id="remark" class="form-control" rows="3" placeholder="输入备注"></textarea>
                </div>
            </div>

            <div class="form-actions">
                <button class="btn btn-outline">取消</button>
                <button class="btn btn-primary">保存档案</button>
            </div>
        </div>
    </div>
</div>

<script>
    // 页面加载完成后执行
    document.addEventListener('DOMContentLoaded', function() {
        // 自定义Logo上传功能
        const logoUpload = document.createElement('input');
        logoUpload.type = 'file';
        logoUpload.accept = 'image/*';
        logoUpload.style.display = 'none';
        document.body.appendChild(logoUpload);

        // 点击Logo可更换
        document.querySelector('.custom-logo').addEventListener('click', function() {
            logoUpload.click();
        });

        logoUpload.addEventListener('change', function(e) {
            const file = e.target.files[0];
            if (file) {
                const reader = new FileReader();
                reader.onload = function(event) {
                    document.querySelector('.custom-logo').src = event.target.result;
                }
                reader.readAsDataURL(file);
            }
        });

        // 表单提交处理
        document.querySelector('.btn-primary').addEventListener('click', function() {
            const name = document.getElementById('name').value;
            if (!name) {
                alert('请输入姓名');
                return;
            }

            console.log('保存档案:', {
                name: name,
                idNumber: document.getElementById('id-number').value,
                gender: document.getElementById('gender').value,
                position: document.getElementById('position').value,
                relation: document.getElementById('relation').value,
                contact: document.getElementById('contact').value,
                createDate: document.getElementById('create-date').value,
                remark: document.getElementById('remark').value
            });

            alert('档案保存成功');
            // 这里可以添加表单提交逻辑
        });

        // 取消按钮处理
        document.querySelector('.btn-outline').addEventListener('click', function() {
            if (confirm('确定要取消编辑吗？未保存的内容将丢失。')) {
                // 这里可以添加取消逻辑
                console.log('取消编辑');
            }
        });
    });
</script>
</body>
</html>